package com.hw.utils;

import java.text.DateFormat;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.propertyeditors.CustomDateEditor;

/**
 * Date Binder
 * @author Administrator
 *
 */
public class DateEditor extends CustomDateEditor{

	public DateEditor(DateFormat dateFormat, boolean allowEmpty) {
		super(dateFormat, allowEmpty);
	}
	
	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		if(StringUtils.isNotEmpty(text)){
			super.setAsText(text);
		}
	}
}
